/**
 * *************************************
 * Copyright(c)2016 Dingdang Yixia 
 * All Rights Reserved.
 *
 * @File: WxSaleUserController.java
 * @Package: com.ddyx.rest
 * @Description:
 * 
 * @Version: V1.0
 * @Author: Yidong.Xiang
 * @Date: 2017年11月28日 下午5:11:28
 * 
 * *************************************
 */
package com.ddyx.rest;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ddyx.service.EventClickFavoriteService;
import com.ddyx.service.EventClickLikeService;
import com.ddyx.service.ICustomerService;
import com.ddyx.service.IEventClickPageviewService;
import com.ddyx.service.IWxCustomerService;
import com.ddyx.util.RequestForm;
import com.ddyx.util.ResponseForm;

/**
 * @ClassName: WxSaleUserController.java
 * @Module: 导购用户操作模块
 * @Description: 导购用户管理小店，查看小店用户、小店经营统计数据等功能
 * 
 * @author: Yidong.Xiang
 * @date: 2017年11月28日 下午5:11:28
 * 
 */
@Controller
@RequestMapping("/clerk")
public class WxSaleUserController {

	@Resource
	IWxCustomerService iWxCustomerService;
	
	@Resource
	EventClickLikeService eventClickLikeService;
	
	@Resource
	EventClickFavoriteService eventClickFavoriteService;
	
	@Resource
	IEventClickPageviewService iEventClickPageviewService;
	
	@Resource
	ICustomerService iCustomerService;
	/**
	 * 获取门店顾客列表
	 * @param requestForm
	 * @return
	 * (老方法,不用了)
	 */
	@ResponseBody
	@RequestMapping(value = "/getWxCustomer", method = RequestMethod.POST)
	public ResponseForm getWxCustomer(@RequestBody RequestForm requestForm) {
		return iWxCustomerService.selectWxCustomer(requestForm);
	}
	
	/**
	 * 获取门店点赞客户列表
	 */
	@ResponseBody
	@RequestMapping(value = "/getLikeCustomer",method = RequestMethod.POST)
	public ResponseForm getLikeCustomer(@RequestBody RequestForm param) {
		return eventClickLikeService.getLikeCustomer(param);
	}
	
	
	/**
	 * 获取门店收藏客户列表(预购)
	 */
	@ResponseBody
	@RequestMapping(value = "/getFavoriteCustomer",method = RequestMethod.POST)
	public ResponseForm getFavoriteCustomer(@RequestBody RequestForm param) {
		return eventClickFavoriteService.getFavoriteCustomer(param);
	}
	
	/**
	 * 获取门店全部客户列表
	 */
	@ResponseBody
	@RequestMapping(value = "getAllCustomer",method = RequestMethod.POST)
	public ResponseForm getAllCustomer(@RequestBody RequestForm param) {
		return iCustomerService.getAllCustomer(param);
	}
	
	/**
	 * 获取所有浏览商品的顾客
	 */
	@ResponseBody
	@RequestMapping(value = "getBrowseCustomer",method = RequestMethod.POST)
	public ResponseForm getBrowseCustomer(@RequestBody RequestForm param) {
		return iEventClickPageviewService.getBrowseCustomer(param);
	}
	
	/**
	 * 获取门店全部客户总数
	 */
	@ResponseBody
	@RequestMapping(value = "getAllCustomerCount",method = RequestMethod.POST)
	public ResponseForm getAllCustomerCount(@RequestBody RequestForm param) {
		return iCustomerService.getAllCustomerCount(param);
	}
	
	
}
